Teach BranchUpdater to set merge branch directly#353
Conversation
There was a problem hiding this comment.
Instead of exposing a method, how about exposing two properties (maybe RemoteName and MergeBranchName)?
There was a problem hiding this comment.
hmm... and pass each one seperately through the branch updater? we could do it that way.
There was a problem hiding this comment.
You could define SetUpstreamTo() as an extension method for convenience, but expose all the possible mutations for BranchUpdater as properties.
There was a problem hiding this comment.
You could define
SetUpstreamTo()as an extension method for convenience
Actually, I'd rather not. At least, for now.
I'd like to try and settle a property based access only for xxxUpdaters in order to see how far we can stretch this out while keeping it usable. Adding methods in the mix may blur the picture a little bit.
|
Updated - I added two properties |
Perfect! And... merged 💥 |
|
@nulltoken Thanks! |
This PR lets us set the upstream remote and merge branch onto a local branch directly.
This is useful when we are pushing a new local branch to a remote and want to set the upstream tracking info. Instead of performing the refspec transform to identify the name of the tracked branch in the
refs/remotesnamespace, we can set the merge branch directly (e.g., using the transforms exposed in #349)